package com.example.demo.service;

import com.example.demo.dao.InsertStudent;
import com.example.demo.dao.StudentRepository;
import com.example.demo.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentService implements InsertStudent {
    @Autowired
    private StudentRepository studentRepository;
    @Override
    public boolean add(Student student){
        System.out.println("test:"+student.toString());
        studentRepository.save(student);
        return true;
    }
}
